<template>
  <ElConfigProvider :locale="locale">
    <router-view v-slot="{ Component }">
      <component :is="Component" />
    </router-view>
  </ElConfigProvider>
</template>
<script setup lang="ts">
import { ElConfigProvider } from 'element-plus'
import zhCN from 'element-plus/lib/locale/lang/zh-cn'
import en from 'element-plus/lib/locale/lang/en'
import { commonStore } from '@/store/index'
const store = commonStore()
const locale = computed(() => {
  const arr = {
    zhCN,
    en,
  }
  return arr[store.locale]
})
onMounted(() => {})
</script>

<style></style>
